﻿Option Explicit On
Option Strict On
Option Infer On

Imports System

Public Enum ParameterType
   Unknown = 0
   Value
   Ref
   Out
End Enum

Namespace VB
   Public Module ParameterTypeExtensions
      <System.Runtime.CompilerServices.Extension()> _
      Public Function Output(ByVal paramType As ParameterType) As String
         Select Case paramType
            Case ParameterType.Value
               Return "ByVal"
            Case ParameterType.Ref
               Return "ByRef"
            Case ParameterType.Out
               Return "ByRef"
            Case Else
               Return "Unknown parameter Type"
         End Select
      End Function
   End Module
End Namespace

Namespace CSharp
   Public Module ParameterTypeExtensions
      <System.Runtime.CompilerServices.Extension()> _
      Public Function Output(ByVal paramType As ParameterType) As String
         Select Case paramType
            Case ParameterType.Value
               Return String.Empty
            Case ParameterType.Ref
               Return "ref"
            Case ParameterType.Out
               Return "out"
            Case Else
               Return "Unknown parameter Type"
         End Select
      End Function
   End Module
End Namespace